#cmake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(ldd)

SET(LDD_MAJOR 1)
SET(LDD_MINOR 0)
SET(LDD_RELEASE 0)
#SET(LDD_NAME ldd_${LDD_MAJOR}-${LDD_MINOR})
SET(LDD_NAME ldd)
SET(LDD_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
SET(LDD_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

# to distinguish between debug and release lib
SET(CMAKE_DEBUG_POSTFIX "d")

FILE(
    GLOB_RECURSE
    LDD_SOURCE_FILES
    ${LDD_SRC_DIR}/*
)

FILE(
    GLOB_RECURSE
    LDD_INCLUDE_FILES
    ${LDD_INCLUDE_DIR}/*.h*
)

INCLUDE_DIRECTORIES(${LDD_INCLUDE_DIR})

ADD_EXECUTABLE(
        ${LDD_NAME}
        
        ${LDD_SOURCE_FILES}
        ${LDD_INCLUDE_FILES}
    )

INSTALL( TARGETS ${LDD_NAME}
    RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
)
